package com.example.YinHang;

public class BankDemo {
    public static void main(String[] args) {
        CheckingAccount c = new CheckingAccount(101);  // 101 卡号
        System.out.println("当前余额： $500...");
        c.deposit(500); // 假设存500

        try {
            System.out.println("\nWithdrawing $100...");
            c.withdraw(100.00);
            System.out.println("\nWithdrawing $600...");
            c.withdraw(600.00);
        } catch (InsufficientFundsException e){
            System.out.println("抱歉, 您缺的余额： $"
                    + e.getAmount());
            e.printStackTrace();
        }
    }
}
